package gameobj;

import java.util.List;

import manager.ElementManager;
import render.Model;

public class Bullet extends Actor {
//	全体共享一个，节约内存
	private static ElementManager em = null;
//	如果是敌方子弹则为false，己方子弹则为true
	private boolean playerOwned = false;
	
	public Bullet() {
		super();
		this.setSpeed(4);
		this.setAttack(1);
		if (em == null) {
			em = ElementManager.get();
		}
	}
	
	public boolean isPlayerOwned() {
		return playerOwned;
	}

	public void setPlayerOwned(boolean playerOwned) {
		this.playerOwned = playerOwned;
//		同时将方向进行改变
		this.setDirection(playerOwned);
	}

	@Override
	protected void attack() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void getHurt(int damage) {
			this.death();
	}

	@Override
	public void death() {
		// TODO Auto-generated method stub
		this.setAlive(false);
	}

}
